import java.math.BigInteger;

public class TestMath {
    public static BigInteger choose(int n, int k) {
	return factorial(n).divide(factorial(k).multiply(factorial(n-k)));
    }

    // Slow Factorial
    public static BigInteger factorial(int n) {
	BigInteger s = new BigInteger(Integer.toString(1));
	for(int i = n; i > 1; i--) {
	    BigInteger I = new BigInteger(Integer.toString(i));
	    s = s.multiply(I);
	}
	return s;
    }

    public static BigInteger countOpenEventPossibilities(int available) {
	BigInteger count = new BigInteger(Integer.toString(0));
	for(int i = 0; i < available; i++) {
	    count = count.add(choose(available, i));
	}
	return count;
    }
}